-- GENERATED SPELL FOR [Shadow Hunter Ty'jin] --


function spell0_16575(pUnit, Event) --@Hex,n/a--
pUnit:FullCastSpellOnTarget(22566,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16575', 10000, 1)
end

function spell1_16575(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17439,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16575', 605, 1)
end

function spell2_16575(pUnit, Event) --@Shrink,n/a--
pUnit:FullCastSpellOnTarget(15802,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16575', 3000, 1)
end

function Sorts_16575(pUnit, Event)
local choix_sorts_16575 = math.random(0, 2)
if choix_sorts_16575 == 0 then
pUnit:RegisterEvent('spell0_16575', 1, 1)
end
if choix_sorts_16575 == 1 then
pUnit:RegisterEvent('spell1_16575', 1, 1)
end
if choix_sorts_16575 == 2 then
pUnit:RegisterEvent('spell2_16575', 1, 1)
end
end

function mob16575_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16575', math.random(1500, 3000), 1)
end

function mob16575_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16575_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16575_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16575, 1, 'mob16575_Action')
RegisterUnitEvent(16575, 2, 'mob16575_Leave')
RegisterUnitEvent(16575, 3, 'mob16575_Kill')
RegisterUnitEvent(16575, 4, 'mob16575_Die')
